export default {
  // 网格线
  grid: {
    show: true,
    horizontal: {
      show: true,
      size: 1,
      color: "#798597",
      style: "solid",
      dashedValue: [2, 2],
    },
    vertical: {
      show: true,
      size: 1,
      color: "#798597",
      style: "solid",
      dashedValue: [2, 2],
    },
  },
  // 蜡烛图
  candle: {
    // 蜡烛图类型 'candle_solid'|'candle_stroke'|'candle_up_stroke'|'candle_down_stroke'|'ohlc'|'area'
    type: "candle_solid",
    // 蜡烛柱
    bar: {
      upColor: "#6CBFB7",
      downColor: "#F58F8D",
      noChangeColor: "#72C5BD",
      upBorderColor: "#4DA990",
      downBorderColor: "#C15466",
      noChangeBorderColor: "#72C5BD",
      upWickColor: "#4DA990",
      downWickColor: "#C15466",
      noChangeWickColor: "#72C5BD",
    },
    // 面积图
    area: {
      lineSize: 2,
      lineColor: "#5A8FCF",
      value: "close",
      backgroundColor: [
        {
          offset: 0,
          color: "rgba(33, 150, 243, 0.01)",
        },
        {
          offset: 1,
          color: "rgba(33, 150, 243, 0.2)",
        },
      ],
    },
    priceMark: {
      show: true,
      // 最高价标记
      high: {
        show: true,
        color: "#D9D9D9",
        textOffset: 5,
        textSize: 10,
        textFamily: "Helvetica Neue",
        textWeight: "normal",
      },
      // 最低价标记
      low: {
        show: true,
        color: "#D9D9D9",
        textOffset: 5,
        textSize: 10,
        textFamily: "Helvetica Neue",
        textWeight: "normal",
      },
      // 最新价标记
      last: {
        show: true,
        upColor: "#2DC08E",
        downColor: "#F92855",
        noChangeColor: "#72C5BD",
        line: {
          show: true,
          // 'solid' | 'dashed'
          style: "dashed",
          dashedValue: [4, 4],
          size: 1,
        },
        text: {
          show: true,
          // 'fill' | 'stroke' | 'stroke_fill'
          style: "fill",
          size: 12,
          paddingLeft: 4,
          paddingTop: 4,
          paddingRight: 4,
          paddingBottom: 4,
          // 'solid' | 'dashed'
          borderStyle: "solid",
          borderSize: 1,
          borderDashedValue: [2, 2],
          color: "#FFFFFF",
          family: "Helvetica Neue",
          weight: "normal",
          borderRadius: 2,
        },
      },
    },
    // 提示
    tooltip: {
      // 'always' | 'follow_cross' | 'none'
      showRule: "none",
      // 'standard' | 'rect'
      showType: "standard",
      // 自定义显示，可以是回调方法也可以是数组，当是一个方法时，需要返回一个数组
      // 数组的子项类型为 { title, value }
      // title和value可以是字符串或者对象，对象类型为 { text, color }
      // title 或者 title.text 可以是国际化的 key，
      // value 或者 value.text 支持字符串模版
      // 例如：想显示时间，开盘和收盘，配置[{ title: 'time', value: '{time}' }, { title: 'open', value: '{open}' }, { title: 'close', value: '{close}' }]
      custom: null,
      defaultValue: "n/a",
      rect: {
        // 'fixed' | 'pointer'
        position: "fixed",
        paddingLeft: 0,
        paddingRight: 0,
        paddingTop: 0,
        paddingBottom: 6,
        offsetLeft: 10,
        offsetTop: 8,
        offsetRight: 10,
        offsetBottom: 8,
        borderRadius: 4,
        borderSize: 1,
        borderColor: "#f2f3f5",
        color: "#FEFEFE",
      },
      text: {
        size: 12,
        family: "Helvetica Neue",
        weight: "normal",
        color: "#D9D9D9",
        marginLeft: 10,
        marginTop: 8,
        marginRight: 6,
        marginBottom: 0,
      },
      // 示例：
      // [{
      //   id: 'icon_id',
      //   position: 'left', // 类型有'left'，'middle'，'right'
      //   marginLeft: 8,
      //   marginTop: 6,
      //   marginRight: 0,
      //   marginBottom: 0,
      //   paddingLeft: 1,
      //   paddingTop: 1,
      //   paddingRight: 1,
      //   paddingBottom: 1,
      //   icon: '\ue900',
      //   fontFamily: 'iconfont',
      //   size: 12,
      //   color: '#76808F',
      //   backgroundColor: 'rgba(33, 150, 243, 0.2)',
      //   activeBackgroundColor: 'rgba(33, 150, 243, 0.4)'
      // }]
      icons: [],
    },
  },
  // 技术指标
  technicalIndicator: {
    margin: {
      top: 0.2,
      bottom: 0.1,
    },
    bar: {
      upColor: "#6CBFB7",
      downColor: "#F58F8D",
      noChangeColor: "#888888",
    },
    line: {
      size: 1,
      colors: ["#FF9600", "#9D65C9", "#2196F3", "#E11D74", "#01C5C4"],
    },
    circle: {
      upColor: "#26A69A",
      downColor: "#EF5350",
      noChangeColor: "#EF5350",
    },
    // 最新值标记
    lastValueMark: {
      show: false,
      text: {
        show: false,
        color: "#ffffff",
        size: 12,
        family: "Helvetica Neue",
        weight: "normal",
        paddingLeft: 3,
        paddingTop: 2,
        paddingRight: 3,
        paddingBottom: 2,
        borderRadius: 2,
      },
    },
    // 提示
    tooltip: {
      // 'always' | 'follow_cross' | 'none'
      showRule: "always",
      // 'standard' | 'rect'
      showType: "standard",
      showName: true,
      showParams: true,
      defaultValue: "n/a",
      text: {
        size: 12,
        family: "Helvetica Neue",
        weight: "normal",
        color: "#D9D9D9",
        marginTop: 6,
        marginRight: 8,
        marginBottom: 0,
        marginLeft: 8,
      },
    },
  },
  // x轴
  xAxis: {
    show: true,
    size: "auto",
    // x轴线
    axisLine: {
      show: true,
      color: "#72C5BD",
      size: 1,
    },
    // x轴分割文字
    tickText: {
      show: true,
      color: "#D9D9D9",
      family: "Helvetica Neue",
      weight: "normal",
      size: 12,
      marginStrat: 4,
      marginBottom: 4,
    },
    // x轴分割线
    tickLine: {
      show: true,
      size: 1,
      length: 3,
      color: "#72C5BD",
    },
  },
  // y轴
  yAxis: {
    show: false,
    size: "auto",
    // 'left' | 'right'
    position: "right",
    // 'normal' | 'percentage' | 'log'
    type: "normal",
    inside: true,
    reverse: false,
    // y轴线
    axisLine: {
      show: true,
      color: "#72C5BD",
      size: 1,
    },
    // x轴分割文字
    tickText: {
      show: true,
      color: "#D9D9D9",
      family: "Helvetica Neue",
      weight: "normal",
      size: 12,
      marginStrat: 4,
      marginBottom: 4,
    },
    // x轴分割线
    tickLine: {
      show: true,
      size: 1,
      length: 3,
      color: "#72C5BD",
    },
  },
  // 图表之间的分割线
  separator: {
    size: 1,
    color: "#72C5BD",
    fill: true,
    activeBackgroundColor: "rgba(230, 230, 230, .15)",
  },
  // 十字光标
  crosshair: {
    show: true,
    // 十字光标水平线及文字
    horizontal: {
      show: true,
      line: {
        show: true,
        // 'solid'|'dashed'
        style: "dashed",
        dashedValue: [4, 2],
        size: 1,
        color: "#72C5BD",
      },
      text: {
        show: true,
        // 'fill' | 'stroke' | 'stroke_fill'
        style: "fill",
        color: "#FFFFFF",
        size: 12,
        family: "Helvetica Neue",
        weight: "normal",
        // 'solid' | 'dashed'
        borderStyle: "solid",
        borderDashedValue: [2, 2],
        borderSize: 1,
        borderColor: "#686D76",
        borderRadius: 2,
        paddingLeft: 4,
        paddingRight: 4,
        paddingTop: 4,
        paddingBottom: 4,
        backgroundColor: "#686D76",
      },
    },
    // 十字光标垂直线及文字
    vertical: {
      show: true,
      line: {
        show: true,
        // 'solid'|'dashed'
        style: "dashed",
        dashedValue: [4, 2],
        size: 1,
        color: "#72C5BD",
      },
      text: {
        show: true,
        // 'fill' | 'stroke' | 'stroke_fill'
        style: "fill",
        color: "#FFFFFF",
        size: 12,
        family: "Helvetica Neue",
        weight: "normal",
        // 'solid' | 'dashed'
        borderStyle: "solid",
        borderDashedValue: [2, 2],
        borderSize: 1,
        borderColor: "#686D76",
        borderRadius: 2,
        paddingLeft: 4,
        paddingRight: 4,
        paddingTop: 4,
        paddingBottom: 4,
        backgroundColor: "#686D76",
      },
    },
  },
  // 覆盖物
  overlay: {
    point: {
      color: "#1677FF",
      borderColor: "rgba(22, 119, 255, 0.35)",
      borderSize: 1,
      radius: 5,
      activeColor: "#1677FF",
      activeBorderColor: "rgba(22, 119, 255, 0.35)",
      activeBorderSize: 3,
      activeRadius: 5,
    },
    line: {
      // 'solid' | 'dashed'
      style: "solid",
      smooth: false,
      color: "#1677FF",
      size: 1,
      dashedValue: [2, 2],
    },
    rect: {
      // 'fill' | 'stroke' | 'stroke_fill'
      style: "fill",
      color: "rgba(22, 119, 255, 0.25)",
      borderColor: "#1677FF",
      borderSize: 1,
      borderRadius: 0,
      // 'solid' | 'dashed'
      borderStyle: "solid",
      borderDashedValue: [2, 2],
    },
    polygon: {
      // 'fill' | 'stroke' | 'stroke_fill'
      style: "fill",
      color: "#1677FF",
      borderColor: "#1677FF",
      borderSize: 1,
      // 'solid' | 'dashed'
      borderStyle: "solid",
      borderDashedValue: [2, 2],
    },
    circle: {
      // 'fill' | 'stroke' | 'stroke_fill'
      style: "fill",
      color: "rgba(22, 119, 255, 0.25)",
      borderColor: "#1677FF",
      borderSize: 1,
      // 'solid' | 'dashed'
      borderStyle: "solid",
      borderDashedValue: [2, 2],
    },
    arc: {
      // 'solid' | 'dashed'
      style: "solid",
      color: "#1677FF",
      size: 1,
      dashedValue: [2, 2],
    },
    text: {
      color: "#1677FF",
      size: 12,
      family: "Helvetica Neue",
      weight: "normal",
    },
    rectText: {
      // 'fill' | 'stroke' | 'stroke_fill'
      style: "fill",
      color: "#FFFFFF",
      size: 12,
      family: "Helvetica Neue",
      weight: "normal",
      // 'solid' | 'dashed'
      borderStyle: "solid",
      borderDashedValue: [2, 2],
      borderSize: 1,
      borderRadius: 2,
      borderColor: "#1677FF",
      paddingLeft: 4,
      paddingRight: 4,
      paddingTop: 4,
      paddingBottom: 4,
      backgroundColor: "#1677FF",
    },
  },
};
